#include <iostream>
#include <vector>

using namespace std;
class Solution
{
public:
    int findMin(vector<int>& nums)
    {
        int left = 0, right = nums.size() - 1;
        int mid = 0;
        while (left < right)
        {
            mid = left + (right - left) / 2;
            if (nums[mid] > nums[right])
                left = mid + 1;
            else
                right = mid;
        }
        return nums[left];
    }
};
int main()
{
    vector<int> nums = { 11, 13, 15, 17 };

    Solution xz;
    int n = xz.findMin(nums);
    cout << n << endl;

	return 0;
}